from django.db import models

# Create your models here.
class StudentModel(models.Model):
    stu_name=models.CharField(max_length=255,unique=True)
    stu_email=models.EmailField(unique=True)
    stu_pwd=models.CharField(max_length=255,)
    class Meta():
        db_table="student"

class CommentsModel(models.Model):
    title=models.CharField(max_length=255)
    content=models.CharField(max_length=255)
    create_time=models.DateTimeField()
    stu=models.ForeignKey(StudentModel,on_delete=models.CASCADE,related_name="stuobj")
    class Meta():
        db_table="comment"